Fix autoclosetag issue.