fixed runStep method