Map editor bugfixes.