Error values are now calculated correctly