Fixed a connection bug