Commit 058303bcf3ddf0149371b4c4b846efd706c5ceec

Con Kolivas 2011-09-07T10:00:10

Only reset values on exiting if we've ever modified them.