bug fixes and enhancements to event tracking