Fixed a bug in SmConnectApiPort