Fix: only output bar numbers once per bar