fix instance decision logic
Merge pull request #8 from hixi-hyi/topic/bugfix

fix instance decision logic