Change namne on the error function to error_event to remove name collision