Fixed bug in storing array size.