pmt performance improvement: avoid some double type casting (c1256