fix for each in extract.js