Fix document loader to use new model