Finalize port logic