fixing how the map moves when resizing