Fixes imperfect random trees generators which broke some tests