reset database if database was closed