Fixed bug that made array duplicate itself