I wanted to have a bossbar to show the average number of husks' health. I used a lot of command blocks and two scoreboards to do it.
If there was no husk, the maximum of the bossbar reached zero. Then, the bossbar was "broken", it will be always zero, even it's real value ans maximum aren't zero in the future.
Does MC-124717 describe the problem?