fixed a seg fault on the recieve and transmit function