Correcting the logical error in the qs1 file