fix some bugs in db module with ORMLite Framework