Correct possible out-of-date pointer bugs.