Fixes bug when binding TCP socket.