Fix broken audit logging