Fix initial mode assignment