Fixes weird movement bug