Fixed a bug with generating two step equations.