Fix a socket bug with Firefox