Minor bugfix, in odb code and fixed some broken tests.