flatten badges