fix scala random