Fixes some wrong output and some crashes when the senderclient disconnects.