Fix regression on document store