preencoding fix