Fix a bug in quantiles computation