corrected an issue in events by type