Fix error in edit()