Found a better fix: bind both on_min and on_max to constain value to range(min,max)