Improved SSL detection