Fix broken nPercentile function