fix interleaved tutdown API code
fix conflicts