Fixes for unicode issues, logging