Fixed the closeEvent not triggering. Now kills child process when the parent dies.