Fix encoding order