fix for case when the encoding isn't present in the list