Fix a bug occurred after closing one of the copied tabs