Replace missing values with median (please note quirk)