fix errors in idb.js