change to exit visitor for modified flag