PortMap fix and test