[JES] Fix the list counter. I was querying the wrong variable after a change I made recently See merge request !220