Got rid of the code in OnClosing that was not working.