Update whenReady.js