Fixed bug looping through anchors.