[WIP] Fix availability calculation

The bug happens when a check is just started or paused

Refs #197