Change `var worker` to `this.worker` so it persists in background.