fixed rwThread close bug