Update waitfor.js