Fixed issue with throwing ProtocolExceptions.