median fixes