Fixed db error