Fix bugs in r747.
Fix bugs in r747.

permazen/permazen,archiecobbs/jsimpledb,tempbottle/jsimpledb,tempbottle/jsimpledb,permazen/permazen,permazen/permazen,archiecobbs/jsimpledb,tempbottle/jsimpledb,archiecobbs/jsimpledb