You may not be getting a good ground from the bed to the frame. If you have a voltmeter, check the voltage from the frame to the wires at the bulb socket.