Fix issue #18
Merge pull request #23 from nchaulet/fix-callback-error

Fix issue #18