Fix sockets merge problems