fixing a index bug in fixmissingfiles