Fix counter in sm elements.