Fix right-edge stuttering problem in platform movement