Fix app resuming, fix hanging when last app is killed, fix a crash when deactivating, fix NC disappearing