move sendInit() call to the right event handling method