Fixed the weird bug in adding indexes for all planning rules.