some timing issue with threads exiting and scheduling