Fix bug: correctly close <a> tag