fixing bug where event was not being cancelled