Don't call the callback twice on error (fixes #347)
Merge pull request #348 from gaearon/patch-1

Don't call the callback twice on error (fixes #347)