fix encode settings