Added the ability to change the range preference on the fly.