Fix restore

Check for null savedinstancestate.