Merge "Fix thread checkpoint issue"