fixed test_db tool