fix wrong mux number calculation