swap this and the next line, it's a race condition (class is removed, ajaxTimeoutId fires and adds it back, window.clearTimeout runs)