fixed the error that made it stop when it could still go up and down