Fix memory debug
debug
Fix build bug, add threads