FIX:Bug in rebulid_db.py