Work around error cases
Some fine-tuning