Fixed bug with multiple iterations happening on what should be one iteration.