Bugfixes for editing mode