fix NPE, use right index in args.