fix event handler for delete button