deal with closing tags