fix apm counter