Use output instead of group, fix #1580