Stopped Klein from killing the connection before everything had written.

This fixes issue #28.