fix median bug introduced in 0.7.5