database now gets documents properly again.