overdub recording on top of new tracks

I have a lenovo ThinkPad running Windows 8.1.

I want to overdub new tracks while listening to the original track with headphones. When I do this Audacity records my overdub but also the original track onto the overdub track. So I don’t get a clean overdub recording. Several years ago I fixed this problem on another laptop but I can’t remember what I did.

Thanks in advance for your help.

David

Set the recording input in the device toolbar to the device that you are using (such as microphone or line in).