Changes hook function type for events