add exception handling to maintain the list of indexes correctly, fixes #252
Merge branch 'divergent' into releases/1.0