fixed bug in mixpanel code