Fixed bugs in Array class.