Removes redundant closing li
fixes #5535