Remove class attribute if it is empty