fixed bug with percentiles