Adjust polyfill to work with capturing