Cleaned secure transport detection and fixed one missing case