added custom extensions (partially) and fixed socket error when the request is aborted when the stats event is emitted