Fix logic to show delete button in edit form