fixed getNestedArrays function in scripts.class