Fixed issues with Socket.IO event listening/sending/emitting