fixed shutdown.