Fixed a critical bug in backwards iteration.