Handle incorrect handling of ports, there are quite a few ways to set it.