Which of the following contains a vague pronoun reference?

 - When Patrick's computer wasn't working properly, he replaced the battery.
 - Patrick replaced the battery in his computer when he noticed that it wasn't working properly.
The first answer choice contains a vague pronoun reference. The pronoun it could refer to the battery or the computer.
Patrick replaced the battery in his computer when he noticed that it wasn't working properly.
The second answer choice shows a possible correction for the vague pronoun reference. The text has been rewritten so that the meaning is clear.
When Patrick's computer wasn't working properly, he replaced the battery.