fixed the DB issues