Fix minor bug in do-each