Corrected bad event handling