Merge "Do not remove task until all activities have been destroyed." into oc-dev