randomInt bug fixed