Fix bug in randint() implementation