fix protocol errors