OPCustom error

im trying to add Operations to a selfhost server but when i try to use the opCustom command in unity i get a error.

code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon;
using ExitGames.Client.Photon;

public class NetworkingTester : PunBehaviour {

private PhotonPeer peer;

void Start()
{
peer = new PhotonPeer(ConnectionProtocol.Tcp);

var parameter = new Dictionary();
parameter.Add((byte)100, 1);

peer.OpCustom(50, parameter, true);
}
}


Error
NullReferenceException: Object reference not set to an instance of an object
ExitGames.Client.Photon.TPeer.EnqueueOperation (System.Collections.Generic.Dictionary`2 parameters, Byte opCode, SendOptions sendParams, EgMessageType messageType)
ExitGames.Client.Photon.PhotonPeer.OpCustom (Byte customOpCode, System.Collections.Generic.Dictionary`2 customOpParameters, Boolean sendReliable, Byte channelId, Boolean encrypt)
NetworkingTester.Start () (at Assets/Scripts/network/NetworkingTester.cs:18)