Fixed bug on target threshold iterations