fixed indexes when checking for hostname in args.