Minor changes, for improved robustness