Corrected index error in general edit