fixed issue with database class when not using a replica set.
Merge branch 'devel' into questionnaires_v2

* devel:
  fixed issue with database class when not using a replica set.