ensuring that correct event is raised from socket io