Fixed thread on close.