- fixed wrong emit call on error events