Fix logic error in DOC