Additional encoding fixes