fix #40 instead of doc.model it was doc.collection