override the onDestroy to close the dabase

I hadn't gotten that error but hopefully this should fix it.