move waitForIndexer() before refreshLocal()