fixed problem with breaking sockets (made it non-static)