fixing a missing index error