fix a weird unicode bug, tweak some other junk