Fixed end of map bug for player collision detection.