Fix error in editing