Fix bug that prevents deletion of port after unlink