fix edge-case logic
Merge pull request #664 from dimagi/fix-repeater

fix edge-case logic