Fixed a bug in the getDocuments callback since 1.0.8