Bugfix: use .each to loop