Would've been easier to just splice the new cord wires inside the D4C housing to the old cord wires coming from the switch (since that part of the old cord was not frayed) . . . but, now that you did what you did already, did you strip away enough wire insulation on the ends of the new cord strands to make good electrical contact inside of the switch?
LR
May 2008