Fix crash when unchecking the attached checkbox after a finished debug session