Added escaping character for queries