Fix shutdown signalling.