Fix #387 - fix sqlite escaping

Fix #387 - fixing sqlite escaping