Trying to fix sqlite error