Fixed issues with escaping characters