Since this appears to be custom code that you’ve added I’m not sure what it could be. I would suggest re-checking all of your code, making sure everything is typed correctly, no duplicates, etc. You may need to start from scratch and re-add it if you’re unable to see why its not working.