fixed bug, wasn't sending analytics events due to bug