fixing resizing making the map smaller due to int conversion