bug fixes for editor