fixed minor bug when same events were added on different clicks