fix

fix some logic