Handle publish within function call #11
Merge pull request #13 from spark/feature/publish-within-function

Fix to handle publish within function call #11