Fixing defaulting of port when not given