fixed shutdown message handling