Merge "Only return to home if the foreground task is removed." into klp-dev