fixing state check where a master isn't even present
Merge pull request #61 from dimagi/preindex_fix

fixing state check where a master isn't even present