fixing save behavior