Improved robustness of the code