db_test fixes