diff --git a/compiler2/ttcn3/Statement.cc b/compiler2/ttcn3/Statement.cc
index 9eeeb214165740e7bf148807acc09ea9504f15ca..64f7d35b2213e6aa94e11d3f54bdc64039f30b4b 100644
--- a/compiler2/ttcn3/Statement.cc
+++ b/compiler2/ttcn3/Statement.cc
@@ -3585,7 +3585,7 @@ error:
       if (ps) {
         port_type = ps->get_port_type();
       } else {
-        error("Cannot determine the type or the port: Missing port clause on the function.");
+        error("Cannot determine the type of the port: Missing port clause on the function.");
       }
     } else {
       port_type = chk_port_ref(port_op.portref);
@@ -3979,7 +3979,7 @@ error:
       if (ps) {
         port_type = ps->get_port_type();
       } else {
-        error("Cannot determine the type or the port: Missing port clause on the function.");
+        error("Cannot determine the type of the port: Missing port clause on the function.");
       }
     } else {
       port_type = chk_port_ref(port_op.portref, port_op.anyfrom);