Better handling for connection drops.

Hi Max!