fixed issue with malformed UTF-8 string;

Fixed issue with malformed UTF-8 string
please, move `else` to the new line