Fixed some bugs with Array2D/3D