Fixing socket-problem