More proper handling of the ports.