Small changes to increase robustness.