Merge "Workaround for apps to stop before removing the task" into sc-dev