Fixing error that set empty the class attribute from the <li> elements