fix segment fault when connect command is executed with less than 2 arguments.