Minor fix for specifying encoding when a valid endpoint is never reached.