fix an issue when delete port