fixing edit button bug