better checks on threads