Correct implementation of docstore.