patch from sw: option save/restore