Fix triangle distribution and use ThreadLocalRandom