Fixed massive error in array transformations