Fixed documents to be type array.