Make generateMax and generateBetween produce uniform output

Fix issue #12.