Fixing socket behavior.