Fixed using an array when it is an object