Fix error when controller result isn't an array.