fixed envelope to support optional callback
Merge pull request #117 from djdmbrwsk/master

fixed envelope to support optional callback