added some workarounds on unicode issues