Fixed random error in test