fixed being able to move vertically without problems
fixed previous bug which wasnt actually fixed
shortened last change in code a little