fixed booboos in the protocol checking