Fix: incorrect count of open and close tags.