Fix small issue in getArrayCopy method.