fix treatment of statistical errors