start fixing socket  communication bugs.