several protocol fixes