Fixed the bug of player running off right side of screen