use spawn
bugfix
fix lifecycle