Fixed socket error emit