Moved state to earlier position in protocol validation