Bug fix: now correctly resize the array, and transpose the old elements into the new array, without taking null