fixed 'error' event emitter memory leak in browser