Fixed infinite loop. doh!

I promise I'm going to stop pushing to master as soon as this gets stable.