Fixed bug with wrong step size