badapp.py: Changes loop to finite.