fixed residue-changing bug.