Fixed bug with arrays