Fix bug when getting current step.