Added some very basic protocol correctness checks