fix anchor replacement