some fixes to event tracking