Fixed string escaping bug in INSERT statement