Adding fix to check for valid event name