Bug fix documents.js callback handler.