Small tweaks to socket