fix for encoding error