Small changes to mux makes it safer