The Past Tense and the Past Progressive
"Often the action expressed with the past progressive was ongoing at the time another action occurred. In such cases, the action that occurred is expressed with the simple past, and the sentence generally includes a subordinate clause that begins with when or while. With when, the past progressive action can be in the main clause, as in (39a), or in the subordinate clause, as in (39b).
(39) a. He was studying for his exam when I saw him this afternoon.
(39) b. She accidentally cut her hand while/when she was chopping vegetables for a salad.