fixed db error