Fix anchor tag replacement