Change emit to emit_error in error callback
Merge remote-tracking branch 'origin/pr/133'