fix some bug on pm counter