Make sure encoding is right