Fixed bug in mapeditor