fix small bugs in the javascript sqlite interface use of concurrency