Fix communications bugs