Better Fix for 'invalide byte sequence in UTF-8'-error