I would first try to see if the brake switch is sticky by spraying with WD40, or something similar, then pushing the switch with your finger a few times. If that didn't help, I would check the switch with a multi meter. To check the switch, you would need to follow the wires or find a schematic...