Use range checked parameters. (#2951)