Template Parameters not loading

We have a script that passes in 2 datasets to a trends template that has an easy chart on it.
When opening the template we get an error saying penList doesn’t exist. I double checked on the template and it’s there and if you reload the template the parameters pass fine. It seems like they are not loading in quick enough after the template it opened.
Is this a common issue.
Version - 8.0.4