The light portion of my celing fan only works occasionally and only when I pull the cord halfway down, I opened the fixture and there are two loose wires one is black and it is coming from the plug that connects the lighting fixture to the fan assy. The other is a purple wire that comes from a little black box. Can you help? Thank you.