If I remember correctly when it loses track of the balls it will deactivate the flippers etc and drain the ball. My machine has a software bug (I think) in "heartbeat" mode when this will happen. I suspect there is a physical or optical switch that isn't working correctly. Probably on the entrance to that ramp or at the stop where the lock is. Just a wild guess.