fix: calculating downtimes