fixes to random array