fixs bug with generator random number