fixed a bug with the map resize