fixed editing mode issue