fix encode fn name typo