Various bug fixes - utf8 conversion