Fixed bug calculating the volume range.
Fixed var naming.