Fixed some bugs with movement