fixes multiple issues with client ip as well as send/recieve data handling