Fix bugs with movement.