improves robustness of some comm code