fix sqlite encode bug