fixed another stupid bug in save/restore