Fix default port handling