fixes that changing the map size causes the layer to grow too