port: fix getEdge() method to not mix input and output ports