In conventional grating-based X-ray interferometry, it is necessary to repeatedly translate one of the gratings with high accuracy in regular submicron steps and to ensure a constant dose delivery during each step. However, stepping errors and dose fluctuations inevitably occur due to mechanical inaccuracies and/or thermal drift of the interferometer during the stepping process. As a result of these stepping errors and dose fluctuations, the standard reconstruction procedure without considering them causes artifacts in the images as stripes of specific frequencies. In this report, we propose an improved reconstruction method to process phase stepping data with stepping errors and dose fluctuations. The approach can be used to estimate the stepping errors and dose fluctuations, and reconstruct virtually artifact-free images. Based on numerical simulations and experimental data including stepping errors and dose fluctuations, we demonstrate that the proposed method is more effective to other previously reported approaches.