protect against crash for invalid tsos