some fixes in mersenne twister random number generator