I would image it is a bad switch. It is likely engaging when you hit the shot, then isnt holding it closed, or the switch itself is flakey and needs to be replaced.
I would do a switch test on the ball lock as well as the ball trough, and see if you have any issues.