Fix for issue #4 - error computing quantiles