fixed saving/loading thread bug