misc changes to duct.js