fixed incorrect normalization in error computations