fixed error in db