Reduction of residual stresses in welded structures