The problem was a bad contact in my brake light switch.