Properly fix tests by removing randomness