Adapt to non-standard ports