fixes creation of event by click