shutdown when tab closed Fixes #737
Merge pull request #781 from nickdesaulniers/shutdown

shutdown when tab closed Fixes #737