Bugfixes and UTF-8 changes