fix NPE in OptimizeIndexJob