cancelEvent fix