Replaced {} after receive while loop with ;