fixed '\0' bug when getting event name from socket