fixed buffer collisions by using memset(); with recieved buffer.