fix for ctrl+c, unattach and quit