Fixed a bug in the protocol and in the py.test test.