Fixed bug if recv_msg was split between \r and \n