Fixed residual phase tensor so the attribute residual_pt is correct and is a PhaseTensor object.