When my C# application closes it sometimes gets caught in the cleanup routine. Specifically, a background worker is not closing. This is basically how I am attempting to close
Try:
if (this.backgroundWorker1.IsBusy) this.backgroundWorker1.CancelAsync();