fixing incompatible encoding exception