1990 8v gti. I noticed last night on the way home my drivers side main beam was on when it should have been dipped, so did the local bobby that pulled me over

. I've just investigated it and the resistor thingy thats the size of a pack of polos is broken at the wires. I can get the wires back on as it's properly rusted. I need to go to work this evening so need it sorted. Any tips to recfiy this?