fix the multi-thread bug...