Fixed bug with get median