fixed promise resolve in indexedDb init