fix delete button closure