fix gc thread bug