Making indexedDB work