Changed how to handle missing index