Fixed typemodes. Fixed PMODE test.