encode quality fix