Merge "Fix not saving state when restarting an activity."