Fixed handling of port 0 (random port)