Patch to deal with median no longer supporting integer variables