fix UpdateState twice when SetupScript failed
Merge pull request #45 from wangchaohui/patch-1

fix UpdateState twice when SetupScript failed