I've also done these things - don't know which, if either, works better...
1. After removing the cable from the battery get back in the car and turn on the lights &/or depress the brake. Then reconnect.
2. Detacth both battery cables from the battery and touch them together. Then reconnect them to their proper terminals.
The reason for doing this is to discharge the capacitors.
Maybe a real mazda mechanic will comment.