fixed clicking with thread