Fix swapped median/mean