fix active cases query