changed the potential possible residual calculation error in linear solve