fixed bug that reloads map when window is resized