Fix for the check for the event object