fix issue with partial application where you could really only call the generated function once.
Merge branch 'hotfix/1.5.1'