Fixing the bug where PAT cloud always says "Failed to shutdown correctly" even when it did