bug fix of arg array length check