1998 BMW 528i tranny issues :(

I have a 1998 bmw 528i (e39) with 200k on it. It runs and drives like a dream except for one little thing… when shifting into the next gear at around 25mph, if I let off the gas just before it shifts it clunks as it shifts into the next gear. However, if I accelerate through the gear change it is smooth as can be and has no problems through the gears.

Secondly and I believe unrelated, I am also looking for the location of a transmission temperature sensor… I have heard they tend to fail and can cause issues with shifting until the car is up to running temp. I experienced an issues with it once not wanting to shift out of 1st gear until it warmed but that was before a filter and fluid change. Since that, I haven’t any issues, but I want to be prepared just in case with one on hand ready to go in.

I have replaced my right rear abs wheel speed sensor and that took care of the clunk…but I am still trying to figure out the cold shifting issue and or the location of the transmission temperature sensor if anyone has any ideas?