Some tweaks.

I think it runs infinitely instead of crashing now.