fix issue with index causing occasional missed/duplicated records