fix for encodingerror