Fix infinite loop with dognzb
Merge pull request #778 from adam111316/dogloopz

Fix infinite loop with dognzb