Fixed the correct computation of the median

Made it so it returns the mathematically correct median calculation when
presented with an even-lengthed array of numbers