fixes rand to not return a 0