Fixed bug in medianofthree()

Fixed bug in medianofthree():
Bug caused by deprecated code that was not removed.