fixed corner cases when events occur right at integration start (which in fact always happen when a resetting event forces a restart just after the event has occurred)