Create a new node with the right mode instead of changing the mode.