Fix to encoding