Added UTF8 encoding and moved join command to listen event.