Fixes crashes due to trying to log unicode characters