bug with restoring fixed.
added test to make sure will not changed