Fixed calculation of max and min number of PME-only nodes. Fixes #787.