Fixed some communication bugs