Some 96 and 97 model year bikes had problems with the hall effect sensor under the cam cover that tells the module when to fire the coil. One of the symptoms is a back fire thru the carb.
My 96 dyna had one that would go static at the weirdest times, hot, cold. while riding, while idling, it made no sense. I managed to troubleshoot it when it happened one day. This was after the HD dealer had 2 under warranty "Could Not Duplicate Malfunction" services. With no problem found, I had to pay the shop time.
I took it to the dealer and they change the sensor. Problem fixed.