Fixed extra if in TCP plugin