Db error fixed