Bugfix in for_each