Fix for order statistics