Fixed Map Editor

Fixed all the bugs in the new map editor