Fix a bug that prevented map from being not a square.