DB: Fixed bugs