fix bug when user doesn't specify port number