Rewriting variables and equation to sort out problems.