fixing scoping issue for index sync

Fixes #106 .
Yeah, it will block the application until it is complete and will timeout occasionally, if you put it in another thread the application can be up before all questions are indexed