Fixed bug that caused player to be repositioned at the far left when reaching the right edge