Update error calculation