bug fix in edit