fixing scoping issue for index sync
Merge pull request #108 from monitorjbl/index-sync-fix

fixing scoping issue for index sync