Fixes bug allowing the map to keep moving after you reach the edge.