diff --git a/opcuaserv.py b/opcuaserv.py
index 46a0a9ff9e009fff6c10b7c8b9dc0ab6d0b01e77..f38b8acb5a4ced13f3e49bb6d45c1897de1de520 100644
--- a/opcuaserv.py
+++ b/opcuaserv.py
@@ -8,6 +8,7 @@ from datetime import datetime;
 import logging
 #import Vars
 #import HWconf
+from pcctypes import *
 
 Vars_R={}
 Vars_W={}
@@ -26,7 +27,7 @@ class SubHandler(object):
 #        myvar2.Value.Value=val
 #        myvar2.SourceTimestamp = datetime.utcnow()
 
-        Inst=Vars.Instr(Vars.DevType.Var,VarD,len(val),val)
+        Inst=Instr(DevType.Var,VarD,len(val),val)
         Q1.put(Inst)
  #       P1.SetVarValue(vname,val)
         #readback
@@ -106,6 +107,7 @@ def InitServer(port=4840):
 #exit()
 
 def start():
+    global running
     running=True
 
 #print("Add modes:")