fix map window bugs related to the editor