fixed bug for edit button