improved robustness of error cases