fix shutdown section and add clean up one