Fix non-ascii queries

Closes #114