Fixed key error in map resizing