fix bug with edit button