Correctly check 'clearonexit' flag when loading settings