fix sqlite dialect problems