Jquery bug, function works on other elements except one

i have a script that replaces a text result value and modifys the css depending on what is displayed

Jquery:

setInterval(function() {
    $('.monthappend').each(function() {
        var text = $(this).text();
        $(this).text(text.replace('$0', 'CUSTOM'));

        if ($(this).text() == 'CUSTOM') {
            $('.monthappend').addClass('without-after-element');
        } else {
            $(this).removeClass("without-after-element")
        }
    });
}, 1000);

HTML:

<div id="s0r16c4" class="monthappend"></div>

Currently on my site the function works for most with the class set except one.
Example link

Im not really sure what is going wrong with it but i can see on inspector that the function does not fire off on it, to test the error input 1000 on the first input field. Im hoping someone out there can help.

Thank you!