sportsman 335 oil cooling fan not working

Hello all. This is my first post here. I hope this site helps me solve a problem and maybe I could help others sometime!

Anyway, I have a 1999 Polaris sportsman 335 and the oil cooling fan does not come on at all. I have tried to bypass the temp sensor by unplugging the 2 yellow/black wires coming from the sensor and turned the key to on…nothing. I have power going to the fan as the red/white and orange/black wires coming from the fan are both "hot" and light up my test light.

Now, I was able to get the fan working when I unplugged the orange/black wire from the fan and grounded it to the frame. I see this orange/black wire goes to a black box that I think is a ECM??? Is there a wire that I should be checking that comes from this ECM that could be a ground that is loose?…Or would a bad ECM not be allowing a ground connection? Is there a way to test the ECM itself?

Much thanks in advance!