A little more info would help in the diagnosis.
Is it on the last ball that the machine dies and goes into the match sequence...if so it's probably an opto in the ball return/eject.
So what exactly happens when and is it the same every time?
Robert