Fix up encoding failure