fix bug in edit action