[fix] Incorrect random range generator calculations.