Which corrects the shift in tense in this sentence?

When they had been thinking about going to the Keys, they did not know how warm it would be at that time of the year.

A.
think

B.
are thinking

C.
have thought

D.
thought