fixed median formatting