handle caps correctly for pm. Fixes #7466