Fixed the one thread bug

Fixed the one thread bug