Fix broken event tracking