Fix code to use random_range config field. #721