fix sqlite related bugs
Merge pull request #5 from goFrendiAsgard/master

fix sqlite related bugs