Fixes a socket bug