We study transformations and equivalences of recursive program schemes. We give an optimization algorithm which recognizes and removes all parts of a program scheme which do not affect its final output. This result leads to a syntactic way of suppressing some erroneous loops in programs and can be used to prove that equivalence of recursive program schemes is solvable under particular conditions.