clear the DB and fix the null