fix  db issues