handle duplicate events; fixes #2