Fixed threads timeout issue