Added lock around index structure.  Thanks for Chuck for spotting this!!!
Merge pull request #319 from thewacokid/master

Added lock around index structure.  Thanks for Chuck for spotting this!!...