repair the permlink