fixed shutdown()