Finally fixed the player movement bug.