Fixed problem with receive loop in tcp/ip interface