Some minor fixes to db tests