remove second foreach from template