Introducing some delay into shutdown to more reliably process the WM_QUIT.
Merge branch 'testsfix' into relpath