Fixed random test failures