fix sqlite updating