avoid IllegalArgumentException for providing nonpositive value for random int when calculating pub bonus