Fixed a typo with encoding parsing

Seems like a typo with encoding parsing.