Also shutdown on ctrl-c wasn't working, partly because of this ordering