Update anchor method to ensure anchors are unique