Infinite send loop fixed with sync statement