Fixing number generation problem.