properly kill subshells on exit