that’s wrong; I think you want i < anchors.size() (think do this as long as)
i < anchors.size()
Chrisir