fix shutdown when could not initialized