Fix incorrect array size causing stack corruption.