Fixed bug in DB unit test