Fix perf counter creation