fix errors for events