Remove unbalanced tags in list layout