fix oversight in edit mode code