Fixed a major bug in player movement