Update worker.js

Investigation for race condition at startup.