Bugfixes on the editor