Agreed; the only change I could make without breaking it is swapping the "<99" with ">-1"-- although that did get the desired result: my tweaked version spews primes until you hit Ctrl-C.
(Yeah, it's lame, but it gave me a brief moment of extreme joy in an otherwise very dreary day.)
I tweaked it like you did, and set it up running on background for 3 days... To my surprise, when I returned today its at 66,683 and running slooooow as hell (takes like a minute or so to print the next iteration).
I wonder how many loops its jumping through to get to the next answer? On a side note: /usr/games/bin/primes got to the same result in like 5 seconds... (just outta curiosity)