Make refresh more resilient to output changes.