fix bug in doc-vectors