Fixing issue where creating a database does not delete the old database