Fixed delegating errors to callbacks

In few places, after callback was called with error, the function was running further, causing unexpedted actions.
Merge pull request #2 from pepkin88/patch-1

Fixed delegating errors to callbacks
Merge branch 'master' into develop