fixing issues related to re-creating db.