Fixes in unicode handling