Fixing issue with the snake hitting the end of the map