`range` and `midrange` were throwing undefined errors because of an argu...

...ment/variable mismatch.