Fixed delegating errors to callbacks

In few places, after callback was called with error, the function was running further, causing unexpedted actions.