Changed the way anchors are generated