Fix editing bug