fixing new encoding