Ignored when detached

I updated and completed the PR #886 of @vincentjames501.
It implement what discussed in issue #875 and PR #885.