Fixed random test errors