Fixed UnicodeError on executing query