Fixed the big thread bug