Fix up event function.