this fixes some glitches such as the player freezing .