fix editing bug and add expectation