fix switching events