Fixed bug in arrays