Real thread bug fix