Fixes encoding errors