fix computation of mean/quantile loss curves