Fixed a bug which put redundant <ul> elements in the tag tree