Correct the error check for events