fix args.length check