fix duplicate event generation