Fixed a bug in the normalized error