When you say the fan is working I am assuming you connected it directly to battery source using both + & - connections? Have you tested the Earth/Positive connections to the fan separately for loose connections/faulty fuse relay? Start simple and build up.