Change the start index of for statement in preprocess_sw()