Fixing critical bug which occured when Random.nextInt(int) was called
with 0.