fixed another issue when resizing map