some fixes of Map and MapEditor