fix sqlite bug