fixing scoping issue for index sync

Fixes #106 .
Gotcha, I moved the thread into `IndexSyncJob`