Few more minor fixes to socket