Fixed a potential error happening with socket 1.0.