Updated saveInstanceState method