Fixing app restart