fix correct in:out port handling