Fix: IndexedDB - Close connection on flush