Fix loop return.

Closes #127.