Unit test robustness fix