fix closing of tags