fixes #2953: pdcounter indexing error