fixed socket error to emit to all clients