Fixed bug with length/max range