fixes of event calculation