fixed ctrl-c shutdown