fix for empty db.