restoring SETTINGS values should probably be moved to ```ensure``` block, as yield may throw an exception (failed assert, for example).