update db and fix pb errors