fix the connection number bug in os x