fix #809 bis
[Pmg] Fix overflow
fix #806
[SimplePMG] add comments in test