Fixed issue where anchors with multiple spaces weren't created correctly