fix some exceptions in editor.java