Fixed all PEX bugs