fix error callback
Merge pull request #1 from joaoneto/master

fix error callback