Fixed dangerous socket security bug