updated the defer method to take the execution context as first
parameter
Merge pull request #360 from insidiator/ticket-356

updated the defer method to take the execution context as first parameter