Resolved a bug of gateway.

Resolved a bug when TS Gateway Port is not 443.