Set correct port in socket connection