Fixed bug that stored arrays as objects