fixed a few protocol errors