Workaround to force AWT threads to stop