Various bug fixes trying to get example(quantile) to work