Fixed object instead of array error