Small fixes to handle unicode characters