fixed issue #27,增加关闭状态