Fix for detach bug
Merge pull request #1 from harleynuss/master

Fix for detach bug