fix a few communication bugs