Add missing detach() calls
Fix triage test