Misc fixes

See mcedit-unified for details.