fix npe

fix npe when deleting an event