Sorry, I’m not seeing anything in your code that should be causing an issue. I could be missing it. At this point I would make a backup of this template and start strippigng things out as well as echoing values to see if I could figure out where it’s going wrong.