Fix bugs related to switch internal event class