fixed listPorts on windows