Fixed a test case which was failing because of random