Changed an error in method GetMedian.