Fixes edge case where empty version token is written on api unavailable.