Renamed some code.
Do not try to restore state if bundle is null.