Fix custom counter lookup.