Network stability added

Sudden disconnects on the client caused crashes and other problems. This
is now rectified.