fixes for random test