fix the bugs of flashDB.js