fix random tests