move screen destruction to after run thread terminates