cleaned up event handling for Mux