fixes encoding