Fixed to save/restore instance state even when the application is
paused.