Fixed connection bug when adding new devices under Mac OSX.