fix bug where autoMode persists across docs