fixing shimmed when.js