Make sure to close a connection to any deleted database