fixed bug in edit action