fix anchor bugs