Fixed badges being lost after class change