Fixed the problem with the map redraw