improved map behavior on resizing