fix model for documents