Fixed socket problem