Correctly closing sockets (fixes #64)