If I remember correctly, what ends the mode is one of the cars interrupting an opto at the end. There's nothing between that and the start that measures how far the motor has driven the cars. So I'd check the opto, and make sure the string isn't hanging into it or something. Does it declare someone won the race?