Fixed bug in the precalculation of the median which did not correctly set the "calculatedMedian" property as expected.
Unit tests confirm fix