Fixed npe-like error in anchorLink