Fixing merge issues related to cosockets patch