Fixed bug with plotting MAP and median