Fixed critical bug in combination with PEX