fixed a seg-fault issue with index entry comparison