Issue 120: Fixed possible NPE during indexing