Calling a script on a pipeline bug.

I was getting attribute errors executing a script on a pipeline.

These changes seem to fix the problem.