editMode() bug fixed