Fix setting of upper limit for mode ranges in cli.