A device and a method for working in the presence of electromagnetic fields, in particular fields occurring in cautery applications. Also relates to a partially implanted medical device (IMD), having a unit for detecting electromagnetic interference fields, at least one control unit, a timer, and a detection unit for electrical measured variables and/or a stimulation unit, at least one electrode line having an electrode at one end which is brought into contact with bodily tissue, and which either extends inside the body and/or is situated on the surface of an implant, wherein when nonphysiological signals and/or electromagnetic interference fields are detected and the unit for electromagnetic interference fields evaluates the detected signals as nonphysiological signals for a first specifiable time period, and/or for a second specified time period the stimulation unit is placed in an asynchronous operating state in which the wearer of the IMD is asynchronously stimulated.