fixed shutdown script