Fixed socket registration error caused by string type port number